home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 16 / BorderLayoutDemo.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  918 b   |  25 lines

  1. /* <applet code = "BorderLayoutDemo" width=300 height=200>
  2.    </applet>
  3. */ 
  4. import java.awt.*;
  5. import java.applet. *;
  6. import java.util.*;
  7. public class BorderLayoutDemo extends Applet { 
  8. public void init() {
  9. setLayout(new BorderLayout());
  10. int width = Integer.parseInt(getParameter("width"));
  11. int height = Integer.parseInt(getParameter("height"));
  12. add("North", new Button("This is across the top"));
  13. add("South", new Label("The footer message might go here"));
  14. add("East", new Button("Left"));
  15. add("West", new Button("Right"));
  16. String msg = "The reasonable man adapts " +
  17.              "himself to the world;\n" + 
  18.              "the unreasonable one persists in " +
  19.              "trying to adapt the world to himself.\n" +
  20.              "Therefore all progress depends " +
  21.              "on the unreasonable rnan.\n\n" +
  22.              "George Bernard Shaw\n\n";
  23. add("Center", new TextArea(msg));
  24. } }
  25.